-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tests-Only] Add acceptance tests for enforced expiration on collaborators share #3159
Conversation
1217f90
to
4430f33
Compare
8468f05
to
f906430
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
194d865
to
d051832
Compare
c955ea7
to
351d6de
Compare
351d6de
to
46301da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature
Outdated
Show resolved
Hide resolved
tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature
Outdated
Show resolved
Hide resolved
tests/acceptance/features/webUISharingInternalUsers/shareWithUsers.feature
Outdated
Show resolved
Hide resolved
9a62d92
to
0e02685
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
And the setting "shareapi_enforce_expire_date_user_share" of app "core" has been set to "yes" | ||
And the setting "shareapi_expire_after_n_days_user_share" of app "core" has been set to "5" | ||
And user "user1" has logged in using the webUI | ||
When the user tries to share file "<shared-resource>" with user "User Two" which expires in "+6" days using the webUI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the user tries to share file "<shared-resource>" with user "User Two" which expires in "+6" days using the webUI | |
When the user tries to share the resource "<shared-resource>" with user "User Two" which expires in "+6" days using the webUI |
should not say file, because one of the examples is a folder
| simple-folder | | ||
|
||
@issue-3174 | ||
Scenario Outline: user cannot share with user with expiration date within set enforced maximum date if default expiry date for both user and group is enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scenario Outline: user cannot share with user with expiration date within set enforced maximum date if default expiry date for both user and group is enabled | |
Scenario Outline: enforced expiry date for groups does not affect user shares |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need also a test for the other direction
const { client } = require('nightwatch-api') | ||
const collaboratorDialog = client.page.FilesPageElement.SharingDialog.collaboratorsDialog() | ||
const SHARE_TYPE_STRING = { | ||
user: 'user', | ||
group: 'group', | ||
federation: 'remote' | ||
} | ||
const COLLABORATOR_PERMISSION_ARRAY = sharingHelper.COLLABORATOR_PERMISSION_ARRAY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unneeded
@@ -1,13 +1,14 @@ | |||
const util = require('util') | |||
const _ = require('lodash') | |||
const { COLLABORATOR_PERMISSION_ARRAY } = require('../../helpers/sharingHelper') | |||
const sharingHelper = require('../../helpers/sharingHelper') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unneeded
.expirationDatePicker() | ||
.setExpirationDate(days) | ||
const dateToSet = sharingHelper.calculateDate(days) | ||
const expectToSucceed = await this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name does not make sense, how does setExpirationDate
know what is expected?
@@ -1009,3 +1016,28 @@ Then('the fields of the {string} collaborator for file/folder/resource {string} | |||
Then('user {string} should have received a share with target {string} and expiration date in {int} day/days', function (user, target, days) { | |||
return checkReceivedSharesExpirationDate(user, target, days) | |||
}) | |||
|
|||
Then('the expiration date input field of collaborators form should have value with {string} days on the webUI', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then('the expiration date input field of collaborators form should have value with {string} days on the webUI', | |
Then('the expiration date shown on the webUI should be {string} days', |
0e02685
to
a713423
Compare
And the setting "shareapi_expire_after_n_days_user_share" of app "core" has been set to "10" | ||
And the setting "shareapi_expire_after_n_days_group_share" of app "core" has been set to "5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be the other way around
6025297
to
82c2ed9
Compare
82c2ed9
to
c723f81
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Description
Acceptance test added for enforced expiration date on a user/group share
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: